<!-- toaster directive -->
<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
<!-- / toaster directive -->

<!-- 导航条 -->
<div class="bg-white bread-crumb">
    <ul class="breadcrumb b-a m-b-n-xs lter b-b wrapper-md">
        <li><a ui-sref="main.toolChest.scenes"><i class="fa fa-home"></i> 首页</a></li>
        <li class="active" ng-bind="title"></li>
    </ul>
</div>

<!-- 加载提醒 -->
<div ng-show="loading" class="text-center m-t-md text-lg"><i class="fa fa-spin fa-spinner"></i> 数据加载中...</div>

<!-- 内容区域 -->
<div ng-hide="loading" class="wrapper-md content">
    <!-- 数据显示 -->
    <div class="wrapper-data">
        <div class="panel panel-default">
            <!-- 头部 -->
            <div class="panel-body">
                <!-- 头部 -->
                <form  class="form-horizontal">
                    <div class="form-group">
                        <div class="col-sm-2">
                            <input type="text" class="form-control" placeholder="场景包名称" ng-model="searchParams.scenesName">
                        </div>
                        <div class="col-sm-2">
                            <input type="text" class="form-control" placeholder="广告主名称" ng-model="searchParams.userName">
                        </div>
                        <div class="col-sm-2">
                            <select class="form-control" ng-model="searchParams.scenesType">
                                <option value="">场景包类型</option>
                                <option value="1">公共</option>
                                <option value="2">自定义</option>
                            </select>
                        </div>
                        <div class="row" align="center">
                            <div class="col-md-1">
                                <label class="col-sm-1 control-label"><button class="ifc-btn btn-primary" ng-click="searchRe()">查 询</button></label>
                            </div>
                            <div class="col-md-1">
                                <label class="col-sm-1 control-label"><button class="ifc-btn btn-dark" ui-sref="main.toolChest.scenes.addScenes({id: item.id})">新 增</button></label>
                            </div>
                            <div class="col-md-1">
                                <label class="col-sm-1 control-label"><button class="ifc-btn btn-dark" ng-click="delSearch()">批量删除</button></label>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <!-- 数据表格 -->
            <div class="table-responsive">
                <table class="table table-striped b-t b-light text-center">
                    <thead>
                    <tr>
                        <th><input type="checkbox" ng-click="selectAll($event)"/>全选</th>
                        <th>场景包类型</th>
                        <th>场景包名称</th>
                        <th>所属公司名称</th>
                        <th>广告位数</th>
                        <th>更新日期</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="item in pageInfo.records">
                        <td class="v-middle"><input ng-model="subCheckBox" name="subCheckBox" type="checkbox" ng-value="{{item.id}}" ng-checked="isSelected(item.id)" ng-click="updateSelection($event,item)"/></td>
                        <td class="v-middle" ng-if="item.scenesType==1">公共</td>
                        <td class="v-middle" ng-if="item.scenesType==2">自定义</td>
                        <td class="v-middle">{{item.scenesName}}</td>
                        <td class="v-middle">{{item.company}}</td>
                        <td class="v-middle" ng-if="item.advertisementCount!=null">{{item.advertisementCount}}</td>
                        <td class="v-middle" ng-if="item.advertisementCount==null">0</td>
                        <td class="v-middle">{{item.updateTime}}</td>
                        <td class="v-middle">
                            <button type="button" style="width: 60px;margin-right: 5px" class="btn btn-sm btn-danger" ui-sref="main.toolChest.scenes.updateScenes({id: item.id,scenesType:item.scenesType})">编辑</button>
                            <button type="button" style="width: 60px;"  class="btn btn-sm btn-primary"  ui-sref="main.toolChest.scenes.copyScenes({id: item.id})">复制</button>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div><!-- /.table-responsive -->

            <!-- 底部分页 -->
            <span data-ng-include=" 'src/tpl/pageInfo.html' "></span>
        </div><!-- /.panel -->
    </div><!-- /.wrapper-data -->
    <form id="saveRecharge">
        <div class="modal fade bs-example-modal-lg" tabindex="-1" data-backdrop="static" id="addScenes" role="dialog" aria-labelledby="gridSystemModalLabel">
            <div class="modal-dialog modal-lg" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="gridSystemModalLabel">快速充值申请</h4>
                    </div>
                    <div class="modal-body" id="RechargeBody">

                        <div class="row">
                            <label class="col-sm-2 control-label text-right">企业名称:</label>
                            <label class="col-sm-4">{{recharge.userName}}</label>

                            <label class="col-sm-2 control-label text-right">充值金额:</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control require number" id="czmoney" data-min="0" data-title="充值金额" name="money" placeholder="充值金额" ng-model="recharge.money">
                            </div>
                        </div>
                        <p></p>
                        <div class="row">
                            <label class="col-sm-2 control-label text-right">付款方式:</label>
                            <div class="col-sm-4">
                                <select class="form-control require" name="method" data-title="付款方式" ng-model="recharge.method">
                                    <option value="">请选择付款方式</option>
                                    <!--<option value="01">支付宝</option>-->
                                    <!--<option value="02">财付通</option>-->
                                    <option value="3">银行转账</option>
                                    <!--<option value="04">现金</option>-->
                                </select>
                            </div>
                            <label class="col-sm-2 control-label text-right">收款人账户:</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control require" data-title="收款人账户" name="account" placeholder="收款人账户" ng-model="recharge.account">
                            </div>
                        </div>
                        <p></p>
                        <div class="row">
                            <label class="col-sm-2 control-label text-right">开户行:</label>
                            <div class="col-sm-4">
                                <select class="form-control require" name="bank" data-title="开户行" ng-model="recharge.bank">
                                    <option value="">请选择开户行</option>
                                    <option ng-repeat="item in banklist" value="{{item.bankCode}}">
                                        {{item.bankName}}
                                    </option>


                                </select>
                            </div>

                            <label class="col-sm-2 control-label text-right">交易流水号:</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control require" name="tradeNo" data-title="交易流水号" placeholder="交易流水号" ng-model="recharge.tradeNo">
                            </div>


                        </div>
                        <p></p>
                        <div class="row">

                            <label class="col-sm-2 control-label text-right">收款单位/个人:</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control require" name="info" placeholder="请输入收款单位/个人信息" data-title="请输入收款单位/个人信息" ng-model="recharge.info">
                            </div>

                            <label class="col-sm-2 control-label text-right">计划打款日期:</label>
                            <div class="col-sm-4">
                                <input type="text"   placeholder="计划打款日期" name="czdate" id="czdate" class="form-control require"  data-title="计划打款日期" onclick="laydate({istime: true, format: 'YYYY-MM-DD', start: laydate.now(0, 'YYYY-MM-DD')})"/>
                            </div>
                        </div>

                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        <button type="button" class="btn btn-primary" ng-click="saveRecharge()">确定</button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->
    </form>

    <form id="saveApply" name="saveApply">
        <div class="modal fade bs-example-modal-lg" tabindex="-1" data-backdrop="static" id="cash" role="dialog" aria-labelledby="CashLabel">
            <div class="modal-dialog modal-lg" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="CashLabel">快速提现申请</h4>
                    </div>
                    <div id="ApplyBody" class="modal-body">

                        <div class="row">
                            <label class="col-sm-2 control-label text-right">企业名称:</label>
                            <label class="col-sm-4">{{apply.userName}}</label>
                            <label style="display: none">{{apply.payerAccount}}</label>
                            <label class="col-sm-2 control-label text-right">提现金额:</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control require" name="money" data-title="提现金额" placeholder="提现金额" ng-model="apply.money">
                            </div>
                        </div>
                        <p></p>
                        <div class="row">
                            <label class="col-sm-2 control-label text-right">付款方式:</label>
                            <div class="col-sm-4">
                                <select class="form-control require" name="method" data-title="请选择付款方式" ng-model="apply.method">
                                    <option value="">请选择付款方式</option>
                                    <!--<option value="01">支付宝</option>-->
                                    <!--<option value="02">财付通</option>-->
                                    <option value="3">银行转账</option>
                                    <!--<option value="04">现金</option>-->
                                </select>
                            </div>
                            <label class="col-sm-2 control-label text-right">收款人账户:</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control require" name="account" data-title="收款人账户" placeholder="收款人账户" ng-model="apply.account">
                            </div>
                        </div>
                        <p></p>
                        <div class="row">
                            <label class="col-sm-2 control-label text-right">行别:</label>
                            <div class="col-sm-4">
                                <select class="form-control require" name="bank" data-title="行别" ng-model="apply.bank">
                                    <option value="">请选择行别</option>
                                    <option ng-repeat="item in banklist" value="{{item.bankCode}}">
                                        {{item.bankName}}
                                    </option>
                                </select>
                            </div>

                            <label class="col-sm-2 control-label text-right">开户行:</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control require" name="Kbank" data-title="开户行" placeholder="开户行" ng-model="apply.Kbank">
                            </div>
                        </div>
                        <p></p>
                        <div class="row">
                            <label class="col-sm-2 control-label text-right">收款单位/个人:</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control require" name="info" data-title="收款单位/个人信息" placeholder="请输入收款单位/个人信息" ng-model="apply.info">
                            </div>
                            <label class="col-sm-2 control-label text-right">计划打款日期:</label>
                            <div class="col-sm-4">
                                <input type="text"   placeholder="计划打款日期 " data-title="计划打款日期" name="txdate" id="txdate" class="form-control require" onclick="laydate({istime: true, format: 'YYYY-MM-DD', start: laydate.now(0, 'YYYY-MM-DD')})"/>
                            </div>
                        </div>

                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        <button type="button" id="saveAppsub" class="btn btn-primary" ng-click="saveApplyCash()">确定</button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->
    </form>

</div><!-- /.wrapper-md -->